﻿@{
    ViewBag.Title = "MemberTransfer";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<script>
    $(function () {
        gridList();
    })
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/BusinessManage/D_AmountChange/GetTransGridJson",
            height: $(window).height() - 96,
            colModel: [
                { label: "主键", name: "F_Id", hidden: true, key: true },
                { label: '操作类型',name: 'F_ActionName', width: 100, align: "center"},
                { label: '转账人员', name: 'F_AccountName', width: 100, align: 'left' },
                { label: '接收人员账号', name: 'F_UserNo', width: 100, align: 'left' },
                { label: '接收人员', name: 'F_UserName', width: 100, align: 'left' },
                { label: '转账金额', name: 'F_Money', width: 500, align: 'left' },
                {
                    label: '创建时间', name: 'F_CreatorTime', width: 130, align: 'left',
                    formatter: "date", formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s' }
                }
            ],
            pager: "#gridPager",
            sortname: 'F_CreatorTime desc',
            viewrecords: true
        });
        $("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: {pData: JSON.stringify({ F_UserNo: $("#txt_F_UserNo").val(),F_UserName:$("#txt_F_UserName").val()})},
            }).trigger('reloadGrid');
        });
    }
    function btn_add() {
        var url = "/SystemManage/User/TransferForm?ttt=" + Date.now();
        $.modalOpen({
            id: "Form",
            title: "账户转账",
            url: url,
            width: "550px",
            height: "350px",
            callBack: function (iframeId) {
                top.frames[iframeId].submitForm();
            }
        });
    }
</script>

<div class="topPanel">
    <div class="search">
        <table>
            <tr>
                <td>
                    <div class="input-group">
                        <input id="txt_F_UserNo" type="text" class="form-control" placeholder="接收人员账号" style="width: 200px;">
                        <input id="txt_F_UserName" type="text" class="form-control" placeholder="接收人员姓名" style="width: 200px;">
                        <span class="input-group-btn">
                            <button id="btn_search" type="button" class="btn  btn-primary"><i class="fa fa-search"></i></button>
                        </span>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div class="toolbar">
        <div class="btn-group">
            <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
        </div>
        <div class="btn-group">
            <a id="NF-add" authorize="yes" class="btn btn-primary" onclick="btn_add()"><i class="fa fa-plus"></i>转账</a>
        </div>
        @*<div class="operate">
            <ul class="nav nav-pills">
                <li class="first">已选中<span>1</span>项</li>
                <li><a id="NF-edit" authorize="yes" onclick="btn_edit()"><i class="fa fa-pencil-square-o"></i>修改商品</a></li>
                <li><a id="NF-delete" authorize="yes" onclick="btn_delete()"><i class="fa fa-trash-o"></i>删除商品</a></li>
            </ul>
            <a href="javascript:;" class="close"></a>
        </div>*@
        <script>$('.toolbar').authorizeButton()</script>
    </div>
</div>
<div class="gridPanel">
    <table id="gridList"></table>
</div>